/*
row by column matrix
*/

#if !defined (_MLMAT2x2_H)
#define _MLMAT2x2_H

#include "mlMath.h"

namespace ml
{

	class Mat2
	{
	public:
		float m00, m01,
			m10, m11;

		Mat2(void);
		Mat2(const Mat2 &);
		Mat2(const Vec2 &, const Vec2 &);
		Mat2(float, float, float, float);
		Mat2(float[4]);
		Mat2(float[2][2]);
		~Mat2(void);

		Mat2 &operator =(const Mat2 &);
		bool operator ==(const Mat2 &) const;
		bool operator !=(const Mat2 &) const;
		Mat2 operator -(void) const;
		Mat2 operator +(const Mat2 &) const;
		Mat2 operator -(const Mat2 &) const;
		Mat2 operator *(const Mat2 &) const;
		Vec2 operator *(const Vec2 &) const;
		Mat2 operator *(float) const;
		Mat2 &operator +=(const Mat2 &);
		Mat2 &operator -=(const Mat2 &);
		Mat2 &operator *=(float);
		float &operator [](int);

		void Identity(void);

		void createRotation(float);
		void createTranslation(Vec2);
		void createScale(float);
	};

}

#endif